<?php

namespace common\models;


use yii\db\ActiveRecord;

class Country extends ActiveRecord
{
    public function rules()
    {
        return [
          [['code', 'name', 'population'], 'required'],
          [['code'], 'string', 'max'=>5],
          [['name'], 'string', 'max'=>15],
          [['population'], 'integer']
        ];
    }

    public static function tableName() {
        return "{{%country}}";
    }
}